require ['knockout','calendarComponent','jquery','bootstrap'], (ko,calendar,$) ->
  ko.components.register 'calendar', calendar
  class viewModel
    constructor: ->
      @value2 = ko.observable null
      @value = ko.observable null
      @max = ko.observable '2017-01-01'
    clickAdd: ->
      console.log 'clickADD'

#      Promise.resolve $.ajax
#        type: 'post'
#        url: './companypostDelbyids'
#        data:''
#        .then (data)=>
#        console.log data
#        @success()

  ko.applyBindings new viewModel()
  $ ->
    $('.slide_button').click ->
      $(this).toggleClass('active')
    $('.allselect').click ->
      $('#list td:eq(0) span').removeClass('off')
      $('#list td:eq(0) span').addClass('on')
      return
    $('#center_list td:eq(0) span').click ->
      $(this).removeClass('off')
      $(this).addClass('on')
